package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_shop_tuijanproduct table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_shop_tuijanproduct"
 */

public abstract class BaseShopTuijanproduct  implements Serializable {

	public static String REF = "ShopTuijanproduct";
	public static String PROP_PRODUCTID = "productid";
	public static String PROP_TUIJIANID = "tuijianid";
	public static String PROP_TJORDER = "tjorder";
	public static String PROP_ID = "id";


	// constructors
	public BaseShopTuijanproduct () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseShopTuijanproduct (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseShopTuijanproduct (
		java.lang.Long id,
		java.lang.Integer tjorder) {

		this.setId(id);
		this.setTjorder(tjorder);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.Integer tjorder;

	// many to one
	private com.jspgou.cms.entity.Product productid;
	private com.jspgou.cms.entity.ShopTuijian tuijianid;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="Id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: tjorder
	 */
	public java.lang.Integer getTjorder () {
		return tjorder;
	}

	/**
	 * Set the value related to the column: tjorder
	 * @param tjorder the tjorder value
	 */
	public void setTjorder (java.lang.Integer tjorder) {
		this.tjorder = tjorder;
	}


	/**
	 * Return the value associated with the column: productid
	 */
	public com.jspgou.cms.entity.Product getProductid () {
		return productid;
	}

	/**
	 * Set the value related to the column: productid
	 * @param productid the productid value
	 */
	public void setProductid (com.jspgou.cms.entity.Product productid) {
		this.productid = productid;
	}


	/**
	 * Return the value associated with the column: tuijianid
	 */
	public com.jspgou.cms.entity.ShopTuijian getTuijianid () {
		return tuijianid;
	}

	/**
	 * Set the value related to the column: tuijianid
	 * @param tuijianid the tuijianid value
	 */
	public void setTuijianid (com.jspgou.cms.entity.ShopTuijian tuijianid) {
		this.tuijianid = tuijianid;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.ShopTuijanproduct)) return false;
		else {
			com.jspgou.cms.entity.ShopTuijanproduct shopTuijanproduct = (com.jspgou.cms.entity.ShopTuijanproduct) obj;
			if (null == this.getId() || null == shopTuijanproduct.getId()) return false;
			else return (this.getId().equals(shopTuijanproduct.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}